package com.barneyx.mshinfoplatform.web.front.store;

import com.barneyx.mshinfoplatform.common.ExResult;
import com.barneyx.mshinfoplatform.entity.store.StoreEntity;
import com.barneyx.mshinfoplatform.util.store.StoreUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/front/store/join/")
public class StoreJoinController {
    @Resource
    private StoreUtil storeUtil;


    /**
     * 创建店铺
     *
     * @param storeInfo
     * @return
     */
    @PostMapping("")
    public ExResult<?> createStore(@RequestBody StoreEntity storeInfo) {
        return ExResult.ofAuto(storeUtil.createStore(storeInfo));
    }

}
